﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WorkShop.WorkShop
{
    public partial class LoadPage_IsPostBack1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) {
                txtLogin.Text = "Fill Data By LoadPage";
                txtPassword.Text = "Fill Data By LoadPage";
                BeginPage();
            }
            SetFocus(txtFirtName);
            
        }
        private void BeginPage() {
            txtFirtName.Text = "";
            txtLastName.Text = "";
            txtCity.Text = "";
            txtPhoneNumber.Text = "";
            txtEmail.Text = "";
        }
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            txtLogin.Text = "Is Post Back";
            txtPassword.Text = "Is Post Back";
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            //remove all controls from the current page
            Controls.Clear();
            Response.Write("The following details have been submitted successfully.<hr />");
            Response.Write("First Name: " + txtFirtName.Text+ ".<br />");
            Response.Write("Last Name: "+ txtLastName.Text +".<br />");
            Response.Write("City: "+ txtCity.Text+"<br />");
            Response.Write("Phone Number : " + txtPhoneNumber.Text +"<br />");
            Response.Write("Email: "+ txtEmail.Text+"<br />");
        }
    }
}